libxl: introduce libxl_userdata_unlink
authorWei Liu <wei.liu2@citrix.com>
Tue, 16 Sep 2014 10:01:16 +0000 (11:01 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 17 Sep 2014 19:00:00 +0000 (20:00 +0100)
commit12ebbe2bae28c0e170e76f61ade65b980ae36b55
tree8758ff1dee90e210b7c66ced84231fef53956a0d
parent9d5550ffc56e72a40c231cead3594403405f2e7e
libxl: introduce libxl_userdata_unlink

This will be used in later patch for xl to remove its "xl" userdata
file.

Both CTX lock and userdata lock are taken in this API. CTX lock is taken
to maintain locking hierarchy, but it also has a side effect to protect
against R-M-W by other threads. Userdata lock is used to protect against
domain destruction.

In general application should not rely on these internal locks to
protect its own userdata files. It should deploys its own lock if it
cares.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_dom.c